<template>
  <!-- vue3页面 -->
    <div>
        <el-button @click="one">111111111</el-button>
		{{data2}}
    </div>
</template>

<script lang='ts'>
import { defineComponent, onMounted,onDeactivated, reactive ,ref, Ref,onActivated,inject} from 'vue'
import emitter from '@/utils/bus'
export default defineComponent({
  	name: 'App',
  	setup() {
    	const data1 = inject('data1') as Ref<string>

    	const data2 = inject('data2') as Ref<boolean>

		const one = ()=>{
			console.log(data1,'data1');
		
			data1.value = '111111111111'
			// emitter.emit('data1',data1.value)
		}

		return {
			one,
			data2

		}
  	}
})
</script>

<style scoped>
</style>